<body class="">

    <!-- [ Pre-loader ] start -->

    <!-- [ Pre-loader ] End -->

    <!-- [ navigation menu ] start -->
    <nav class="pcoded-navbar menupos-fixed menu-light">
        <div class="navbar-wrapper  ">
            <div class="navbar-content scroll-div ps">
                <ul class="nav pcoded-inner-navbar ">
                    <li class="nav-item pcoded-menu-caption">
                        <label>WingFung</label>
                    </li>
                    <li class="nav-item">
                        <a href="/" class="nav-link ">
                            <span class="pcoded-micon">
                                <i class="feather icon-home"></i></span><span class="pcoded-mtext">首页</span></a>
                    </li>
                    <li class="nav-item pcoded-menu-caption">
                        <label>工时管理</label>
                    </li>
                    <li class="nav-item">
                        <a href="/employee_hours/" class="nav-link "><span class="pcoded-micon"><i
                                class="feather icon-file-text"></i></span><span class="pcoded-mtext">人员工时</span></a>
                    </li>
                    <li class="nav-item">
                        <a href="/machine_hours/" class="nav-link "><span class="pcoded-micon"><i
                                class="feather icon-align-justify"></i></span><span class="pcoded-mtext">设备机时</span></a>
                    </li>
                    <li class="nav-item pcoded-menu-caption">
                        <label>管理</label>
                    </li>
                    <li class="nav-item pcoded-hasmenu">
                        <a href="#!" class="nav-link "><span class="pcoded-micon"><i
                                class="feather icon-box"></i></span><span class="pcoded-mtext">基础数据</span></a>
                        <ul class="pcoded-submenu">
                            <li><a href="/employee/">员工表</a></li>
                            <li><a href="/process/">工序表</a></li>
                            <li><a href="/device/">设备表</a></li>
                            <li><a href="/device_type/">设备类型表</a></li>


                        </ul>
                    </li>


                </ul>

                <div class="card text-center">
                    <div class="card-block">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                        <i class="feather icon-sunset f-40"></i>
                        <br>
                        <p>Need more?</p>
                        <a target="_blank" rel="noopener noreferrer"
                           href="https://appseed.us/admin-dashboards/django-dashboard-gradient-pro"
                           class="btn btn-primary btn-sm text-white m-0">Gradient PRO</a>
                    </div>
                </div>

                <div class="ps__rail-x" style="left: 0px; bottom: 0px;">
                    <div class="ps__thumb-x" tabindex="0" style="left: 0px; width: 0px;"></div>
                </div>
                <div class="ps__rail-y" style="top: 0px; right: 0px;">
                    <div class="ps__thumb-y" tabindex="0" style="top: 0px; height: 0px;"></div>
                </div>
            </div>
        </div>
    </nav>
    <!-- [ navigation menu ] end -->


    <!-- [ Header ] start -->
    <header class="navbar pcoded-header navbar-expand-lg navbar-light headerpos-fixed header-blue">


        <div class="m-header">
            <a class="mobile-menu" id="mobile-collapse" href="#!"><span></span></a>
            <a href="#!" class="b-brand">
                <!-- ========   change your logo hear   ============ -->
                <img src="/static/assets/images/logo.png" alt="" class="logo">
                <img src="/static/assets/images/logo-icon.png" alt="" class="logo-thumb">
            </a>
            <a href="#!" class="mob-toggler">
                <i class="feather icon-more-vertical"></i>
            </a>
        </div>
        <div class="collapse navbar-collapse">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a href="#!" class="pop-search"><i class="feather icon-search"></i></a>
                    <div class="search-bar">
                        <input type="text" class="form-control border-0 shadow-none" placeholder="Search here">
                        <button type="button" class="close" aria-label="Close">
                            <span aria-hidden="true">×</span>
                        </button>
                    </div>
                </li>
                <li class="nav-item">
                    <a href="#!" class="full-screen" onclick="javascript:toggleFullScreen()"><i
                            class="feather icon-maximize"></i></a>
                </li>
            </ul>
            <ul class="navbar-nav ml-auto">
                <li>
                    <div class="dropdown">
                        <a class="dropdown-toggle" href="#" data-toggle="dropdown"><i
                                class="icon feather icon-bell"></i><span class="badge bg-danger"><span
                                class="sr-only"></span></span></a>
                        <div class="dropdown-menu dropdown-menu-right notification">
                            <div class="noti-head">
                                <h6 class="d-inline-block m-b-0">Notifications</h6>
                                <div class="float-right">
                                    <a href="#!" class="m-r-10">mark as read</a>
                                    <a href="#!">clear all</a>
                                </div>
                            </div>
                            <ul class="noti-body ps">
                                <li class="n-title">
                                    <p class="m-b-0">NEW</p>
                                </li>
                                <li class="notification">
                                    <div class="media">
                                        <img class="img-radius" src="/static/assets/images/user/avatar-1.jpg"
                                             alt="Generic placeholder image">
                                        <div class="media-body">
                                            <p><strong>John Doe</strong><span class="n-time text-muted"><i
                                                    class="icon feather icon-clock m-r-10"></i>5 min</span></p>
                                            <p>New ticket Added</p>
                                        </div>
                                    </div>
                                </li>
                                <li class="n-title">
                                    <p class="m-b-0">EARLIER</p>
                                </li>
                                <li class="notification">
                                    <div class="media">
                                        <img class="img-radius" src="/static/assets/images/user/avatar-2.jpg"
                                             alt="Generic placeholder image">
                                        <div class="media-body">
                                            <p><strong>Joseph William</strong><span class="n-time text-muted"><i
                                                    class="icon feather icon-clock m-r-10"></i>10 min</span></p>
                                            <p>Prchace New Theme and make payment</p>
                                        </div>
                                    </div>
                                </li>
                                <li class="notification">
                                    <div class="media">
                                        <img class="img-radius" src="/static/assets/images/user/avatar-1.jpg"
                                             alt="Generic placeholder image">
                                        <div class="media-body">
                                            <p><strong>Sara Soudein</strong><span class="n-time text-muted"><i
                                                    class="icon feather icon-clock m-r-10"></i>12 min</span></p>
                                            <p>currently login</p>
                                        </div>
                                    </div>
                                </li>
                                <li class="notification">
                                    <div class="media">
                                        <img class="img-radius" src="/static/assets/images/user/avatar-2.jpg"
                                             alt="Generic placeholder image">
                                        <div class="media-body">
                                            <p><strong>Joseph William</strong><span class="n-time text-muted"><i
                                                    class="icon feather icon-clock m-r-10"></i>30 min</span></p>
                                            <p>Prchace New Theme and make payment</p>
                                        </div>
                                    </div>
                                </li>
                                <div class="ps__rail-x" style="left: 0px; bottom: 0px;">
                                    <div class="ps__thumb-x" tabindex="0" style="left: 0px; width: 0px;"></div>
                                </div>
                                <div class="ps__rail-y" style="top: 0px; right: 0px;">
                                    <div class="ps__thumb-y" tabindex="0" style="top: 0px; height: 0px;"></div>
                                </div>
                            </ul>
                            <div class="noti-footer">
                                <a href="#!">show all</a>
                            </div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="dropdown drp-user">
                        <a href="#!" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="/static/assets/images/user/avatar-1.jpg" class="img-radius wid-40"
                                 alt="User-Profile-Image">
                        </a>
                        <div class="dropdown-menu dropdown-menu-right profile-notification">
                            <div class="pro-head">
                                <img src="/static/assets/images/user/avatar-1.jpg" class="img-radius"
                                     alt="User-Profile-Image">
                                <span>

                                </span>

                                <a href="#" class="dud-logout" title="Logout">
                                    <i class="feather icon-log-out"></i>
                                </a>
                            </div>
                            <ul class="pro-body">
                                <li><a href="#" class="dropdown-item"><i class="feather icon-user"></i> Profile - </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
            </ul>
        </div>


    </header>
    <!-- [ Header ] end -->


    <!-- [ Main Content ] start -->
    <section class="pcoded-main-container">
        <div class="pcoded-content">
            <!-- [ breadcrumb ] start -->
            <div class="page-header">
                <div class="page-block">
                    <div class="row align-items-center">
                        <div class="col-md-12">
                            <div class="page-header-title">
                                <h5 class="m-b-10">添加人员工时</h5>
                            </div>
                            <ul class="breadcrumb">
                                <li class="breadcrumb-item"><a href="/"><i class="feather icon-home"></i></a></li>
                                <li class="breadcrumb-item"><a href="#!">基础数据</a></li>
                                <li class="breadcrumb-item"><a href="#!">人员工时</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <!-- [ breadcrumb ] end -->
            <!-- [ Main Content ] start -->
            <div class="row">

                <!-- [ stiped-table ] start -->
                <div class="col-xl-12">

                    <div class="card">
                        <div class="card-header">
                            <div style="height: 15px;"></div>
                        </div>
                        <div class="card-body">
                            <div class="row">
                                <div class="col-sm-3"></div>
                                <div class="col-sm-6">
                                    <form action="/add_employee_hour" method="post">
                                        <input type="hidden" name="csrfmiddlewaretoken"
                                               value="dbPHsCS7uPk5nQIJIigmd9n7j4vBJUYkpPKHuSwLbdsOUaoF5o9hyDONmlFtFq7p">
                                        <div class="input-group mb-3">
                                            <div class="input-group-prepend">
                                                <span class="input-group-text" id="jobName">姓名</span>
                                            </div>
                                            <select name="employee" class="form-control" id="id_employee">
                                                <option value="4">庞义鹏</option>

                                                <option value="5">李豪东</option>

                                            </select>
                                        </div>
                                        <div class="input-group mb-3">
                                            <div class="input-group-prepend">
                                                <span class="input-group-text" id="process">工序</span>
                                            </div>
                                            <select class="custom-select" id="inputGroupSelect01">

                                                <option value="1">炼胶</option>

                                                <option value="2">涂胶</option>

                                                <option value="3">成型</option>

                                                <option value="4">二次加热</option>

                                                <option value="5">液体成型</option>

                                                <option value="6">研磨</option>

                                                <option value="7">静电</option>

                                                <option value="8">切割</option>

                                                <option value="9">自动机</option>

                                                <option value="10">机压</option>

                                                <option value="11">手工作业</option>

                                                <option value="12">冷冻</option>

                                            </select>
                                        </div>
                                        <div class="input-group mb-3">
                                            <div class="input-group-prepend">
                                                <label class="input-group-text" for="id_hours">工时</label>
                                            </div>
                                            <input type="number" class="form-control" placeholder="工时"
                                                   aria-label="hours" aria-describedby="basic-addon1"></div>
                                        <div class="input-group mb-3">
                                            <div class="input-group-prepend">
                                                <label class="input-group-text" for="id_workday_year">日期</label>
                                            </div>
                                            <select name="workday_year" required="" id="id_workday_year"
                                                    class="form-control">
                                                <option value="2021" selected="">2021</option>
                                                <option value="2022">2022</option>
                                                <option value="2023">2023</option>
                                                <option value="2024">2024</option>
                                                <option value="2025">2025</option>
                                                <option value="2026">2026</option>
                                                <option value="2027">2027</option>
                                                <option value="2028">2028</option>
                                                <option value="2029">2029</option>
                                                <option value="2030">2030</option>
                                            </select><select name="workday_month" required="" id="id_workday_month"
                                                             class="form-control">
                                            <option value="1">一月</option>
                                            <option value="2">二月</option>
                                            <option value="3">三月</option>
                                            <option value="4">四月</option>
                                            <option value="5">五月</option>
                                            <option value="6">六月</option>
                                            <option value="7">七月</option>
                                            <option value="8">八月</option>
                                            <option value="9">九月</option>
                                            <option value="10">十月</option>
                                            <option value="11">十一月</option>
                                            <option value="12" selected="">十二月</option>
                                        </select><select name="workday_day" required="" id="id_workday_day"
                                                         class="form-control">
                                            <option value="1">1</option>
                                            <option value="2">2</option>
                                            <option value="3">3</option>
                                            <option value="4">4</option>
                                            <option value="5">5</option>
                                            <option value="6">6</option>
                                            <option value="7">7</option>
                                            <option value="8">8</option>
                                            <option value="9">9</option>
                                            <option value="10">10</option>
                                            <option value="11">11</option>
                                            <option value="12">12</option>
                                            <option value="13">13</option>
                                            <option value="14">14</option>
                                            <option value="15">15</option>
                                            <option value="16">16</option>
                                            <option value="17">17</option>
                                            <option value="18">18</option>
                                            <option value="19">19</option>
                                            <option value="20">20</option>
                                            <option value="21">21</option>
                                            <option value="22">22</option>
                                            <option value="23">23</option>
                                            <option value="24" selected="">24</option>
                                            <option value="25">25</option>
                                            <option value="26">26</option>
                                            <option value="27">27</option>
                                            <option value="28">28</option>
                                            <option value="29">29</option>
                                            <option value="30">30</option>
                                            <option value="31">31</option>
                                        </select>
                                        </div>
                                        <div class="form-group mx-sm-3 mb-2 text-center">
                                            <button type="submit" class="btn btn-primary mb-2">确定</button>
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <button type="button" class="btn btn-primary mb-2" onclick="btn_ret()">取消
                                            </button>
                                        </div>
                                    </form>
                                </div>
                                <div class="col-sm-3"></div>
                            </div>


                            <script>
                                // Example starter JavaScript for disabling form submissions if there are invalid fields
                                (function () {
                                    'use strict';
                                    window.addEventListener('load', function () {
                                        // Fetch all the forms we want to apply custom Bootstrap validation styles to
                                        var forms = document.getElementsByClassName('needs-validation');
                                        // Loop over them and prevent submission
                                        var validation = Array.prototype.filter.call(forms, function (form) {
                                            form.addEventListener('submit', function (event) {
                                                if (form.checkValidity() === false) {
                                                    event.preventDefault();
                                                    event.stopPropagation();
                                                }
                                                form.classList.add('was-validated');
                                            }, false);
                                        });
                                    }, false);
                                })();

                                //点击后返回员工列表页
                                function btn_ret() {
                                    window.location.replace("/employee_hours/")
                                }


                            </script>
                        </div>
                    </div>


                </div>
                <!-- [ stiped-table ] end -->

            </div>
            <!-- [ Main Content ] end -->
        </div>
    </section>
    <!-- [ Main Content ] end -->


    <script src="/static/assets/js/vendor-all.min.js"></script>
    <script src="/static/assets/js/plugins/bootstrap.min.js"></script>
    <script src="/static/assets/js/pcoded.min.js"></script>


    <!-- Specific Page JS goes HERE  -->


</body>


<div class="row">
    <div class="col-sm-3"></div>
    <div class="col-sm-6">
        <form action="{% url 'add_employee_hour' %}" method="post">
            {% csrf_token %}
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text" id="jobName">姓名</span>
                </div>
                {{ eh_form.employee }}
            </div>
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <span class="input-group-text" id="process">工序</span>
                </div>
                <select class="custom-select" id="inputGroupSelect01">
                    {% for p in process_list %}
                        <option value="{{ p.id }}"
                                {% if eh_form.process == p.id %}selected{% endif %}>{{ p.name }}</option>
                    {% endfor %}
                </select>
            </div>
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <label class="input-group-text"
                           for="{{ eh_form.hours.id_for_label }}">工时</label>
                </div>
                <input type="number" class="form-control" placeholder="工时"
                       aria-label="hours" aria-describedby="basic-addon1"></div>
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <label class="input-group-text"
                           for="{{ eh_form.workday.id_for_label }}">日期</label>
                </div>
                {{ eh_form.workday }}
            </div>
            <div class="form-group mx-sm-3 mb-2 text-center">
                <button type="submit" class="btn btn-primary mb-2">确定</button>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <button type="button" class="btn btn-primary mb-2"
                        onclick="btn_ret()">取消
                </button>
            </div>
        </form>
    </div>
    <div class="col-sm-3"></div>
</div>



<!-- 人员工时页面 分类显示 按钮组--代码 -->
                                    <div class = "btn-group mb-2 mr-2">
                                        <div class = "input-group mb-2 mr-2">
                                            <button class = "btn  btn-info dropdown-toggle" type = "button"
                                                    data-toggle = "dropdown" aria-haspopup = "true"
                                                    aria-expanded = "false">
                                                分类显示
                                            </button>
                                            <div class = "dropdown-menu">
                                                <a class = "dropdown-item active" href = "{% url 'employee_hours' 1 %}">今天</a>
                                                <a class = "dropdown-item" href = "{% url 'employee_hours' 0 %}">昨天</a>
                                                <a class = "dropdown-item" href = "{% url 'employee_hours' 3 %}">本周</a>
                                                <a class = "dropdown-item" href = "{% url 'employee_hours' 6 %}">本月</a>
                                                <a class = "dropdown-item" href = "{% url 'employee_hours' 8 %}">今年</a>
                                                <a class = "dropdown-item" href = "{% url 'employee_hours' 9 %}">所有</a>
                                            </div>
                                        </div>

                                    </div>